<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
*     Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
*     Use is subject to license terms.
*
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="nbdocs:/org/netbeans/modules/usersguide/ide.css" rel="stylesheet" type="text/css">
<title>Setting the Target JDK in a JavaFX Project</title>
</head>
<body>
<h2>Setting the Target JavaFX SDK in a JavaFX Project</h2>
<p> <small><a href="#seealso">See Also</a>&nbsp; </small> 
<p>By default, a newly created JavaFX project uses the JavaFX SDK that came bundled with the JavaFX plugin.  It is the default  platform  used for compilation, execution, debugging, and profiling of JavaFX applications. This platform is based on the bundled JavaFX libraries and the Java SE platform (JDK) that you have selected to use during the IDE installation. You can view the JDK version your IDE installation is using by choosing Help &gt; About 
  and clicking 
  the Detail tab. (On a MacOS platform, choose NetBeans &gt; About NetBeans). The JDK version is listed in the Java field. 
<ul class="note"> 
    <li>You can run the IDE with a different JDK version by starting the IDE with 
      the <tt>--jdkhome</tt>&nbsp; <i><tt>jdk-home-dir</tt> </i>switch on the 
      command line or in your <tt><i>IDE-HOME</i>/etc/netbeans.conf</tt> file. 
      For more information, see <a href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/configure/configure_startup-switches.html">IDE 
      Startup Parameters</a>. 
</ul>

<p><b>To set the default platform for a JavaFX project:</b></p>
<ol>
  <li>Right-click the project's root node in the Projects window and choose Properties.<br>
  Alternatively, on the Windows platform, you can select the project in the Projects window and select File &gt;  Project Properties (<i>JavaFX_project_name</i>) from the main menu.  </li>
  <li>In the Project Properties dialog box, select the Libraries node in the
  	left pane. </li>
  <li>Choose the desired JavaFX platform in the JavaFX Platform combo box and click OK. 
    <p>Switching the target Platform for a JavaFX project does the following: 
    <ul>
   	    <li>Offers the new target platform's classes for code completion.</li>
      	  <li>If available, displays the target SDK's source code and Javadoc documentation.</li>
      	  <li>Uses the target SDK's executables (<tt>javafxc</tt> and <tt>javafxrt</tt>) 
        	  to compile and execute your application.</li>
      	  <li>Compiles your source code against the target SDK's libraries.
      	  </li>
    </ul>
  </li>
</ol>
<p><a name="add_fx_platform"></a><b>To register additional JavaFX platforms with the IDE:</b></p>
  <ol>
      <li>Choose Tools &gt; Java Platforms from the main menu of the IDE.</li>
      <li>From the Java Platform Manager, click the Add Platform button. </li>
      <li>In the Add Java Platform wizard, select the JavaFX Platform type and click Next.</li>
      <li>Specify the Platform Name you want assigned to the new platform configuration.</li>
      <li>Specify the folder that contains the necessary JavaFX libraries to use with the new JavaFX platform. Use the Browse button to navigate to the folder of the JavaFX SDK installation you want to use. You will get a warning if the selected platform is not supported. Proceeding to work with this platform is not recommended.</li>
      <li>Click Finish. <br>
        The new platform is added to the list of available JavaFX platforms.</li>
      <li>Click Close to dismiss the Java Platform Manager dialog. </li>
</ol>
<dl>
    <dt><a name="seealso">See Also</a></dt>
    <dd><a href="../compile/javafx_comp_classpath.html">Managing the Classpath of JavaFX Projects</a></dd>
      <dd>&nbsp;</dd>
      <dd>&nbsp;</dd>
</dl>

<hr>
<small><a href="../credits.html">Legal Notices</a></small> 
</body>
</html>
